import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int seconds = num.nextInt();
        int h = seconds/3600;
        int min = ((seconds%3600))/60;
        int s = ((seconds%3600)%60)%60;
        System.out.print(h+" "+min+" "+s);
    }
}
